﻿#pragma once
#include <QString>
#include <QObject>

class SubTopicInfoEntity : public QObject
{
    Q_OBJECT

public:
    SubTopicInfoEntity(QObject *parent = nullptr) : QObject(parent), m_id(-1), m_name(""), m_topic(""), m_qos(0), m_enable(false), m_hex(false) {}

    SubTopicInfoEntity(const SubTopicInfoEntity &other)
    {
        m_id = other.m_id;
        m_name = other.m_name;
        m_topic = other.m_topic;
        m_qos = other.m_qos;
        m_enable = other.m_enable;
        m_hex = other.m_hex;
    }

    // get set
    int id() const { return m_id; }
    void setId(int id) { m_id = id; }

    QString name() const { return m_name; }
    void setName(const QString &name) { m_name = name; }

    QString topic() const { return m_topic; }
    void setTopic(const QString &topic) { m_topic = topic; }

    int qos() const { return m_qos; }
    void setQos(int qos) { m_qos = qos; }

    bool enable() const { return m_enable; }
    void setEnable(bool enable) { m_enable = enable; }

    bool hex() const { return m_hex; }
    void setHex(bool hex) { m_hex = hex; }

private:
    // id
    int m_id;
    // name
    QString m_name;
    // topic
    QString m_topic;
    // qos
    int m_qos;
    // enable
    bool m_enable;
    // hex
    bool m_hex;
};
